﻿@model SimplCommerce.Module.News.Areas.News.ViewModels.NewsVm

@{
    ViewData["Title"] = Localizer["News"];
}

<div class="news row">
    <div class="categories row">
        <div class="btn-group btn-group-justified" role="group" aria-label="...">
            @foreach (var item in Model.NewsCategory)
            {
                <div class="btn-group" role="group">
                    <a type="button" class="btn btn-default" href="~/@item.Slug"> @item.Name</a>
                </div>
            }
        </div>
    </div>
    @if (Model.NewsItem.Any())
    {
        <div class="news-category-detail row">
            @foreach (var item in Model.NewsItem)
            {
                <partial name="_NewsThumbnail" model="item" />
            }
        </div>
    }
</div>

<div class="row">
    <div class="col-md-12 text-right">
        <cs-pager cs-paging-pagesize="@Model.PageSize"
                  cs-paging-pagenumber="@Model.Page"
                  cs-paging-totalitems="@Model.TotalItem"
                  asp-basehref="~/@Model.CurrentNewsCategory.Slug"
                  cs-pagenumber-param="page"
                  cs-pager-li-current-class="page-item active"
                  cs-pager-li-other-class="page-item"
                  cs-pager-li-non-active-class="page-item disabled"
                  cs-pager-link-current-class="page-link"
                  cs-pager-link-other-class="page-link"></cs-pager>
    </div>
</div>

